<template>
    <div class="cart_header">
        <div class="td">
            <div>100%正品保证</div>
            <div>所有商品精挑细选</div>
            <div>售后无忧</div>
        </div>
        <div class="dd">
            <p>购物数量&nbsp;&nbsp;<span v-if="goodsCount > 0">{{goodsCount}}</span></p>
            <div class="btns" @click="toggle" v-if="goodsCount > 0">
               {{isShow==false? '管理':"取消"}}
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            isShow:false
        }
        
    },
    props:{
        goodsCount:{
            type:Number
        }
    },
    methods:{
        toggle(){
            this.isShow = !this.isShow
            this.$emit('share-show',this.isShow)
        }
    }
}
</script>

<style lang="scss" scoped>
.cart_header{
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 10;
    .td{
        display: flex;
        justify-content: space-around;
        height: 38px;
        line-height: 38px;
        background-color: #f5f5f5;
        color: #8c8c8c;
        font-size: 13px;
        >div::before{
            content: '';
            display: inline-block;
            width: 13px;
            height: 13px;
            background: url(../../assets/icon/common/yes_8c.png) no-repeat;
            background-size: 100% 100%;
            vertical-align: middle;
            margin-right: 5px;
            margin-top: -1px;
        }
    }

    .dd{
        height: 38px;
       
        padding: 0 15px;
        display: flex;
        background-color: #fff;
        justify-content: space-between;
        align-items: center;
        p{
            font-size: 14px;
            color: #282828;
            span{
                color: #fc4141;
            }
        }
        .btns{
            
                height: 23px;
                width: 55px;
                line-height: 23px;
                display: inline-block;
                border-radius: 4px;
                border:1px solid #868686;
                font-size: 13px;
                color: #282828;
                text-align: center;
                
            
        }

    }
}

</style>



